package day20171102;

import java.util.Scanner;

/**
 * Created by dell on 2017/11/2.
 */
public class Test {
    public static void main(String[] args) {
        int a = 0;
        int b = 0;
        Scanner scanner = new Scanner(System.in);

        while (true) {
            System.out.println("please input 1st int:");
            a = scanner.nextInt();
            System.out.println("plese input 2nd int:");
            b = scanner.nextInt();
            int c=0;
            try{
                 c = a / b;
            }catch (ArithmeticException e){//可能会出什么错误
                System.out.println("除数为0！"); //出错以后采取的措施
            }

            System.out.println(a + "/" + b + "=" + c);
        }
    }
}